package com.elontian.http.async2.impl;

import android.widget.ImageView;

import com.elontian.http.async2.ILoadImg;
import com.elontian.http.async2.handler.AsyncHttpHandler;
import com.elontian.http.async2.strategy.IFactory;
import com.elontian.http.async2.strategy.impl.LoadImgStrategyFactory;
import com.elontian.http.async2.util.AsyncRunable;

public class LoadImg implements ILoadImg {

	@Override
	public void loadImg(String url, ImageView view, int outW, int outH,
			AsyncHttpHandler handler) {
		// TODO Auto-generated method stub
		handler.setUrl(url);
		IFactory factory = new LoadImgStrategyFactory(url, outW, outH, view);
		AsyncRunable run = new AsyncRunable(handler);
		run.setStrategy(factory.createStrategy());
		run.excute();

	}

}
